  <?php 
 $this->language->load('common/extra_oc_lang');
?>
<section> <div class="products_slider">
  <div class="std">
    <div class="product-title"> <span><?php echo $heading_title; ?></span></div>
    <a href="#" class="jcarousel-prev-horizontal" id="products_slider_prev1"></a> <a href="#" class="jcarousel-next-horizontal" id="products_slider_next1"></a>
    <div class="slider-container">
      <div class=" jcarousel-skin-tango">
        <ul id="products_slider1" class="products-grid-home">
          <?php foreach ($products as $product) { ?>     
          <li> 
        <?php if ($product['thumb']) { ?>
              <a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>" class="product-image">
               
                    <?php if ($product['price'] && $product['special']) { ?>
                         <div class="sale-label sale-top-right"><?php echo $this->language->get('lang_sale'); ?> </div>
                  <?php } ?>
                <img class="small-image" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>"> 
                 <?php 
                 if(isset($image)){   ?>
                   <?php $show_24wg=1; foreach ($image as $hover) {
                       if($product['product_id']==$hover['hover_id'])
                       { ?>
                <img class="thumbnail" src="<?php echo $hover['mousehover'] ?>" alt="<?php echo $product['name']; ?>"> 
                <?php 
                  }
                  else{ if($show_24wg==1){ ?>
                 <img class="thumbnail" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>"> 
                <?php }
                }
                $show_24wg=$show_24wg+1;
                }
                
                } else{ ?>
                 <img class="thumbnail" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>"> 
                <?php  }
                 ?>  
             </a> 
              <?php } ?>
              <a class="product-detail-bnt" rel="category-gallery" title="" href="<?php echo $product['href']; ?>">&nbsp;</a>
            <div class="prod_image_detail">
                <div class="inner">
                    <a class="product-name" href="<?php echo $product['href']; ?>" title="<?php echo html_entity_decode(substr($product['name'],0,22));?>"><?php echo html_entity_decode(substr($product['name'],0,22))."..";?></a>
                    <div class="rating">
                        <div class="ratings">
                          <div class="rating-box">
                                <?php if ($product['rating']) { ?>
                                <div class="rating"><img src="catalog/view/theme/vista/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                                <?php } ?>
                          </div>
                        </div>
                    </div>
                   
                      <div class="price-box">
          <?php if ($product['price']) { ?>
                    <?php if (!$product['special']) { ?>
                        <span class="regular-price">
                        <span class="price"> <?php echo $product['price']; ?></span>
                        </span>
                   
                    <?php } else { ?>
                      <span class="old-price">
                        <span class="price"><?php echo $product['price']; ?></span>
                        </span>
                    
                       <span class="regular-price">
                        <span class="price"><?php echo $product['special']; ?></span>
                        </span>
                    <?php } ?>

                <?php } ?>
        
    
    </div>
                  
                </div>
              <div class="actions">
                <button type="button" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button btn-cart" title="<?php echo $button_cart; ?>">
                    <span><?php echo $button_cart; ?></span>
                </button>
                  <span class="add-to-links">                           
                      <a title="<?php echo $this->language->get('lang_wishlist'); ?>" class="button link-wishlist" onclick="addToWishList('<?php echo $product['product_id']; ?>');">  <span><<?php echo $this->language->get('lang_wishlist'); ?></span></a> 
                      <a title="<?php echo $this->language->get('lang_compare'); ?>" class="button link-compare" onclick="addToCompare('<?php echo $product['product_id']; ?>');">  <span><<?php echo $this->language->get('lang_compare'); ?></span></a> 
                  </span>
              </div>
            </div>
          </li>
            <?php } ?>
        </ul>
      </div>
    </div>
    <script type="text/javascript">
jQuery(document).ready(function($) {

	function mycarousel_initCallback(carousel) {
	    $('#products_slider_next1').bind('click', function() {
	        carousel.next();
	        return false;
	    });
	    $('#products_slider_prev1').bind('click', function() {
	        carousel.prev();
	        return false;
	    });
	};

    $('#products_slider1').jcarousel({
	    scroll: 1,
    	initCallback: mycarousel_initCallback,
	    buttonNextHTML: null,
	    buttonPrevHTML: null
    });
});
</script>
  </div>
</section>
